﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Numeria.IO;
using System.IO;

namespace TestConsole
{
    class Program
    {
        static string dbFile = @"C:\Temp\MvcDemo.dat";

        static void Main(string[] args)
        {
            //
            // Parallel Insert
            //
            //Save();

            var f = new FileDB(dbFile, FileAccess.Read);
            var s = f.OpenRead(Guid.Parse("c50e75d4-64ea-45b6-b265-68b8ab68d818"));
            var r = new StreamReader(s);

            Console.WriteLine(r.ReadLine());
            Console.WriteLine(r.ReadLine());
            Console.WriteLine(r.ReadLine());
            Console.WriteLine(r.ReadLine());
            Console.WriteLine(r.ReadLine());


            Console.ReadLine();

        }

        public static void Save()
        {
            var info = FileDB.Store(dbFile, @"C:\Temp\text.txt");

            Console.WriteLine(info.ID);
        }
    }
}
